<!--
 * @Author: 刘润泽
 * @Date: 2023-03-09 18:06:17
 * @LastEditors: 刘润泽
 * @LastEditTime: 2023-03-13 14:05:59
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>输血管理系统</title>
    <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="/element-theme/blue/index.css">
</head>
<body>
<div class="data-manage-table">
    <template>
        <el-form ref="form" :inline="true" style="padding:20px 20px 0 20px;">
            <el-form-item label="患者输血申请单号">
                <el-input placeholder="请输入申请单号" v-model="pagination.transfusionNumber"></el-input>
            </el-form-item>
            <el-form-item label="临床输血申请状态">
                <el-select   v-model="pagination.state" style="width:100px">
                    <el-option  v-for="item in options"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value" >
                    </el-option></el-select>
<!--                <el-input placeholder="请输入申请状态" v-model="pagination.state"></el-input>-->
            </el-form-item>
            <el-form-item label="申请日期">
                <el-date-picker v-model="pagination.dateTime" type="daterange" size="small" format="yyyy-MM-dd"
                                value-format="yyyy-MM-dd"
                                range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
                </el-date-picker>
            </el-form-item>
            <el-form-item label="审核日期">
                <el-date-picker v-model="pagination.dateTime1" type="daterange" size="small" format="yyyy-MM-dd"
                                value-format="yyyy-MM-dd"
                                range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
                </el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="getByQueryPage(1)">搜索</el-button>
                <el-button type="primary" @click="batchDelete">删除</el-button>
                <el-button type="info" @click="getByQueryPage()">重置</el-button>
            </el-form-item>
        </el-form>

        <el-dialog title="临床输血申请" center :visible.sync="dialogClinicVisible" width="1200px" @close="cancel">
            <el-descriptions   :content-style="rowCenter" :label-style="rowCenter" class="margin-top"  :column="3"  :size="size" border>
                <el-descriptions-item>
                    <template slot="label" align="center" >
                        病历号
                    </template>
                    {{ clinicSample.medicalRecordNumber}}</el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label" align="center" >
                        临床输血申请单号
                    </template>
                    {{ clinicSample.transfusionNumber}}</el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label" align="center" >
                        受血者身份证号
                    </template>
                    {{ clinicSample.patientIdcard}}</el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label" align="center" >
                        受血者血样检验信息单号
                    </template>
                    {{ bloodTestSample.inspectionSheet}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    临床诊断
                </template>
                {{ clinicSample.clinicalDiagnosis}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    输血目的
                </template>
                {{clinicSample.transfusionPurpose}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    输血成分
                </template>
                {{clinicSample.transfusionType}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    申请输血量
                </template>
                {{clinicSample.transfusionVolume}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    预定输血日期
                </template>
                {{ clinicSample.scheduledTransfusionTime}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    辐照血
                </template>
                {{ clinicSample.isIrradiationBlood}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                过滤血
                </template>
                {{ clinicSample.isFilteringBlood}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    复检
                </template>
                {{ clinicSample.isRecheck }}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                接受标本时间
                </template>
                {{ clinicSample.acceptSampleTime}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                申请医生
                </template>
                {{clinicSample.applyDoctor }}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                主治医师
                </template>
                {{ clinicSample.attendingPhysician}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                申请日期
                </template>
                {{clinicSample.applyTime }}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                输血同意书
                </template>
                {{ clinicSample.isSignConsentForm}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                受血者血液标本
                </template>
                {{clinicSample.recipientSpecimen }}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                接收标本时间
                </template>
                {{ clinicSample.receiveSampleTime}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    受血者ABO血型
                </template>
                 {{bloodSample.bloodType}} </el-descriptions-item>
            <el-descriptions-item>
            <template slot="label" align="center" >
                受血者Rh（D）血型
            </template>
                {{bloodSample.rhd}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    谷丙转氨酶
                </template>
                {{bloodSample.alt }}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    红细胞
                </template>
                {{ bloodSample.rbc}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                   乙肝表面抗原
                </template>
                {{ bloodSample.hbsag}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    血红蛋白
                </template>
                {{ bloodSample.hb}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    丙肝抗体
                </template>
                {{bloodSample.hcv }}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                血小板
                </template>
                {{bloodSample.plt }}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                梅毒
                </template>
                {{ bloodSample.rpr}}</el-descriptions-item>
            <el-descriptions-item>
                <template slot="label" align="center" >
                    驳回原因
                </template>
                <el-input type="text" ref="getRejectReason" prop="rejectReason" placeholder="请输入驳回原因" v-model="rejectSample.rejectReason"></el-input>
            </el-descriptions-item>


            </el-descriptions>


            <!-- 底部区域 -->
            <span slot="footer" class="dialog-footer">
                    <el-button id="pass" @click="pass()">通 过</el-button>
                    <el-button id="reject" @click="backnew">驳 回</el-button>
                </span>
        </el-dialog>

        <el-table  ref="transfusionTable"  :data="tableData" style="width: 100%" border
                  :header-cell-style="{'text-align': 'center','background': '#eef1f6'}" highlight-current-row
                  @current-change="" fit>

            <el-table-column type="selection" width="55" align="center"></el-table-column>

            <el-table-column prop="transfusionNumber" label="申请单号"  align="center">
            </el-table-column>
            <el-table-column prop="applicantId" label="申请人工号"  align="center">
            </el-table-column>
            <el-table-column prop="applyTime" label="申请时间"  align="center">
            </el-table-column>
            <el-table-column prop="reviewerId" label="审核人工号"  align="center">
            </el-table-column>
            <el-table-column prop="reviewTime" label="审核时间"  align="center">
            </el-table-column>
            <el-table-column prop="rejectReason" label="驳回原因"  align="center">
            </el-table-column>
            <el-table-column prop="state" label="状态"  align="center">
                <template slot-scope="scope">
                    {{ getStateName(scope.row.state)}}
                </template>
            </el-table-column>
            <el-table-column label="操作"   align="center">
                <template slot-scope="scope">
                    <el-button size="mini" type="danger" id="review" @click="viewInfo(scope.$index,scope.row)" :disabled="scope.row.state == '1' ? false : true">审核</el-button>

                </template>
            </el-table-column>
        </el-table>


        <div class="pagination-container">
            <el-pagination class="pagination"
                           @size-change="handleSizeChange"
                           @current-change="handleCurrentChange"
                           :current-page="pagination.currentPage"
                           :page-sizes="[5,10,20]"
                           :page-size="pagination.pageSize"
                           layout="total, sizes, prev, pager, next, jumper"
                           :total="pagination.total"
                           style="text-align: center; margin-top: 20px;">
            </el-pagination>
        </div>

    </template>
</div>

<script src="/plugins/vue-2.6.11/vue.js"></script>
<script src="/plugins/element-2.4.5/index.js"></script>
<script src="/icons/iconfont.js"></script>
<script src="/js/axios.min.js"></script>
<script src="/js/2.15.12/index.js"></script>
<link href="/css/2.15.12/index.min.css" rel="stylesheet">
<!--<script src="https://cdn.jsdelivr.net/npm/element-ui@2.15.12/lib/index.min.js"></script>-->
<!--<link href="https://cdn.jsdelivr.net/npm/element-ui@2.15.12/lib/theme-chalk/index.min.css" rel="stylesheet">-->
<script src="/js/httpVueLoader.js"></script>
<script src="/js/jquery.min.js"></script>
<script>Vue.prototype.$ELEMENT = { size: 'medium' };</script>
<script>

    (
        function () {

        var vm = window.vm = new Vue({
            el: '.data-manage-table',
            data() {
                //身份证校验
                const checkIdNum = (rule, value, callback) => {
                    if (!value) {
                        return callback(new Error('身份证不能为空'))
                    }
                    if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
                        callback(new Error('请输入正确的二代身份证号码'))
                    } else {
                        callback()
                    }
                }
                //纯中文校验
                const validateContacts = (rule, value, callback) => {
                    if (!value) {
                        return callback(new Error('请输入中文'))
                    }
                    if (!/^[\u0391-\uFFE5A-Za-z]+$/.test(value)) {
                        callback(new Error('不可输入特殊字符'))
                    } else {
                        callback()
                    }
                }
                //纯数字校验
                const validateNumber = (rule, value, callback) => {
                    let numberReg = /^\d+$|^\d+[.]?\d+$/
                    if (value !== '') {
                        if (!numberReg.test(value)) {
                            callback(new Error('请输入数字'))
                        } else {
                            callback()
                        }
                    } else {
                        callback(new Error('请输入值'))
                    }
                }
                return {
                    options: [{
                        value: '1',
                        label: '等待审核'
                    }, {
                        value: '2',
                        label: '通过'
                    }, {
                        value: '3',
                        label: '驳回'
                    },
                    ],

                    //操作用户
                    user:{
                        username:"",
                        jobnum:"",
                    },
                    //时间格式化



                    page: {},
                    name: '',
                    pageNum: 1,
                    // pageSize: 5,
                    form: {},
                    rowCenter:{
                        "text-align":"center"
                    },
                    //搜索样本信息
                    searchSample: {
                        bloodSampleNumber: '',  //编号
                        dateVal: '',    //日期范围
                    },
                    //临床诊断选项
                    optionDiagnosis:[],
                    input3:'',

                    size:'',

                    //输血成分
                    optionTransfusionType:[],
                    //申请状态
                    stateTypeList:[],
                    //ABO选项
                    optionAboType:[],
                    //Rh选项
                    optionRhType:[],


                    //表格信息
                    tableData:[],
                    //分页相关信息
                    pagination:{
                        currentPage:1,
                        pageSize:5,
                        total:0,
                        //查询条件
                        transfusionNumber:'',
                        state:'',
                        dateTime:'',
                        dateTime1:'',
                    },


                    dialogClinicVisible:false,
                    dialogRejectVisible:false,
                    bloodSample:{
                        bloodType:'',
                        rhd:'',
                        alt:'',
                        rbc:'',
                        hbsag:'',
                        hb:'',
                        hcv:'',
                        hiv:'',
                        plt:'',
                        rpr:'',
                    },

                    clinicSample: {
                        medicalRecordNumber: '',
                        transfusionNumber:'',
                        patientIdcard: '',
                        clinicalDiagnosis: '',
                        transfusionPurpose: '',
                        transfusionType:'',
                        transfusionVolume:'',
                        scheduledTransfusionTime: '',
                        isIrradiationBlood: '',
                        isFilteringBlood: '',
                        isRecheck: '',
                        acceptSampleTime: '',
                        applyDoctor: '',
                        attendingPhysician: '',
                        applyTime: '',
                        isSignConsentForm: '',
                        recipientSpecimen: '',
                        receiveSampleTime: '',
                        reviewerId:'',


                    },
                    rejectSample:{
                        rejectReason: '',
                    },
                    bloodTestSample:{
                        inspectionSheet:'',

                    },
                    clinicSample1:[],
                    //表单验证
                    formRules: {
                        medicalRecordNumber: [
                            {required: true, message: '请输入病历号', trigger: 'blur'},
                        ],
                        transfusionNumber: [
                            {required: true, message: '请输入输血申请单号', trigger: 'blur'},
                        ],
                        patientIdcard: [{
                            required: true,
                            message: "身份证号码不能为空",
                            trigger: "blur"
                        }, {
                            validator: checkIdNum,
                            trigger: 'blur'
                        }, ],
                        clinicalDiagnosis: [
                            {required: true, message: '请选择临床诊断', trigger: 'blur'},
                            {
                                validator:validateContacts,
                                trigger: "blur"
                            }
                        ],
                        transfusionPurpose: [
                            {required: true, message: '请输入输血目的', trigger: 'change'},
                            {
                                validator:validateContacts,
                                trigger: "blur"
                            }
                        ],
                        suspendedRbc: [
                            {required: false, message: '请输入数量', trigger: 'blur'},
                            {
                                validator:validateNumber,
                                trigger: "blur"
                            }
                        ],
                        plasma: [
                            {required: false, message: '请输入数量', trigger: 'blur'},
                            {
                                validator:validateNumber,
                                trigger: "blur"
                            }
                        ],
                        platelet: [
                            {required: false, message: '请输入数量', trigger: 'blur'},
                            {
                                validator:validateNumber,
                                trigger: "blur"
                            }
                        ],
                        washRbc: [
                            {required: false, message: '请输入数量', trigger: 'blur'},
                            {
                                validator:validateNumber,
                                trigger: "blur"
                            }
                        ],
                        wholeBlood: [
                            {required: false, message: '请输入数量', trigger: 'blur'},
                            {
                                validator:validateNumber,
                                trigger: "blur"
                            }
                        ],
                        other: [
                            {required: false, message: '请输入数量', trigger: 'blur'},
                            {
                                validator:validateNumber,
                                trigger: "blur"
                            }
                        ],

                        scheduledTransfusionTime: [
                            {required: true, message: '请选择预定输血日期', trigger: 'blur'},
                        ],
                        isIrradiationBlood: [
                            {required: true, message: '请选择', trigger: 'blur'},
                        ],
                        isFilteringBlood: [
                            {required: true, message: '请选择', trigger: 'blur'},
                        ],
                        isRecheck: [
                            {required: true, message: '请选择', trigger: 'blur'},
                        ],
                        acceptSampleTime: [
                            {required: true, message: '请选择接受标本时间', trigger: 'blur'},
                        ],
                        applyDoctor: [
                            {required: true, message: '请输入申请医师', trigger: 'blur'},
                        ],
                        attendingPhysician: [
                            {required: true, message: '请输入主治医师', trigger: 'blur'},
                        ],
                        applyTime: [
                            {required: true, message: '请输入', trigger: 'blur'},
                        ],
                        isSignConsentForm: [
                            {required: true, message: '请输入', trigger: 'blur'},
                        ],
                        recipientSpecimen: [
                            {required: true, message: '请输入', trigger: 'blur'},
                        ],
                        receiveSampleTime: [
                            {required: true, message: '请输入', trigger: 'blur'},
                        ],
                        rejectReason: [
                            {required: true, message: '请输入驳回原因', trigger: 'blur'},
                            {
                                validator:validateContacts,
                                trigger: "blur"
                            }
                        ],

                    }
                }
            },

            created() {

                this.getByQueryPage();
                //this.loadTable(this.pageNum);

            },

            mounted(){
                this.getStateType();
                this.getStateName();
                this.getABOtype();
                this.getABOName();
                this.getRhType();
                this.getRhName();

                this.user = sessionStorage.getItem("user") ? JSON.parse(sessionStorage.getItem("user")) : {};


            },
            methods: {
                handleEdit(index, row) {
                    this.form={}
                    console.log(index, row);
                    this.updateForm=row
                    this.dialogUpdateVisible = true
                },
                //分页查询
                handleSizeChange:function(pageSize){
                    this.pagination.pageSize=pageSize;
                    this.getByQueryPage(1)
                },
                //分页查询 切换页码
                handleCurrentChange:function (currentPage) {
                    this.pagination.currentPage = currentPage;//执行查询
                    this.getByQueryPage(1);

                },



                loadTable(num) {
                    this.pageNum = num;
                    $.get("/transfusionClinic/normal/list").then(res => {
                        this.tableData=res.data.records;
                        console.log(res.data.records);
                    });


                },
                //查询
                getByQueryPage:function(flag){
                    if(flag!="1"){
                        this.pagination.transfusionNumber='';
                        this.pagination.state='';
                        this.pagination.dateTime='';
                        this.pagination.dateTime1='';
                        this.pagination.currentPage=1;
                    }
                    if(this.pagination.dateTime!=null){
                        this.startTime=this.pagination.dateTime[0]
                        this.endTime=this.pagination.dateTime[1]
                    }
                    if(this.pagination.dateTime1!=null){
                        this.reviewStartTime=this.pagination.dateTime1[0]
                        this.reviewEndTime=this.pagination.dateTime1[1]
                    }
                    axios.get('/transfusionClinic/normal/'+this.pagination.currentPage+'/'+this.pagination.pageSize,
                        {

                            params:{
                                transfusionNumber:this.pagination.transfusionNumber,
                                state:this.pagination.state,
                                startTime:this.startTime,
                                endTime:this.endTime,
                                reviewStartTime:this.reviewStartTime,
                                reviewEndTime:this.reviewEndTime,
                            }
                        }).then(res => {
                            console.log(res.data.data)
                        if(res.data.code === 200){
                            this.pagination.pageSize=res.data.data.size;
                            this.pagination.currentPage=res.data.data.current;
                            this.pagination.total=res.data.data.total;
                            this.tableData=res.data.data.records;
                            }else{
                                this.$message.error("查询失败")
                        }
                    })
                },

                //点击审核展示临床输血申请信息
                viewInfo(index,row) {
                    this.clinicSample = row
                    $.post("/transfusionClinic/normal/applyList",{transfusionNumber:row.transfusionNumber}).then(res => {
                        if (res.data[0] != null){
                            this.clinicSample = JSON.parse(JSON.stringify(res.data[0]))
                            console.log(this.clinicSample)
                            console.log(res)
                            $.post("/transfusionClinic/normal/bloodList",{transfusionNumber:row.transfusionNumber}).then(res1 => {
                                console.log(res1.data[0])
                                this.bloodSample.bloodType=this.getABOName(res1.data[0].bloodType)
                                this.bloodSample.rhd=this.getRhName(res1.data[0].rhd)
                               this.bloodSample.alt=res1.data[0].alt
                               this.bloodSample.rbc=res1.data[0].rbc
                               this.bloodSample.hbsag=res1.data[0].hbsag
                               this.bloodSample.hb=res1.data[0].hb
                               this.bloodSample.hcv=res1.data[0].hcv
                               this.bloodSample.hiv=res1.data[0].hiv
                               this.bloodSample.plt=res1.data[0].plt
                               this.bloodSample.rpr=res1.data[0].rpr
                                this.bloodTestSample.inspectionSheet=res1.data[0].inspectionSheet
                                this.dialogClinicVisible = true;

                            });
                        }else{
                            this.$message.error("无该患者申请信息！");
                        }
                    });
                },
                //通过临床输血申请
                pass(reviewerId){
                    reviewerId=this.user.jobnum
                    let rejectReason= this.$refs.getRejectReason.value;
                    console.log(reviewerId)
                    let data = JSON.stringify(this.clinicSample);
                    console.log(data)
                    if(rejectReason=="") {
                        $.ajax({
                            url: '/transfusionClinic/review/pass?reviewerId=' + reviewerId,
                            type: 'post',
                            contentType: 'application/json',
                            data: data
                        }).then(res => {
                            this.dialogClinicVisible = false;
                            //document.getElementById("review").disabled=true;

                        })
                        this.loadTable(1);
                    }else{
                        this.$notify({
                            tile: '警告',
                            message: '请勿填写驳回原因',
                            type: 'warning'
                        })
                    }

                },
                //驳回临床输血申请
                backnew(reviewerId) {
                    let data = JSON.stringify(this.clinicSample);
                    reviewerId=this.user.jobnum
                    let rejectReason= this.$refs.getRejectReason.value;
                    console.log(data);
                    if(rejectReason!=="") {
                        $.ajax({
                            url: '/transfusionClinic/review/reject?rejectReason=' + rejectReason + '&reviewerId=' + reviewerId,
                            type: 'post',
                            contentType: 'application/json',
                            data: data,
                        }).then(res => {
                            this.$notify({
                                tile: '温馨提示',
                                message: '驳回成功',
                                type: 'success'
                            })
                            this.dialogClinicVisible = false;
                        })
                        this.loadTable(1);
                    }else{
                        this.$notify({
                            tile: '警告',
                            message: '请填写驳回原因',
                            type: 'warning'
                        })
                    }
                },
                //获取申请状态数据字典transfusion_type
                getStateType(){
                    $.ajax({
                        url: '/transfusionClinic/normal/typelist',
                        type: 'get',
                        contentType: 'application/json',
                    }).then((res) =>{
                           // if(res.data.code === 200){
                            this.stateTypeList=res
                            console.log(res)
                        // }else{
                        //     this.$notify.error({
                        //         title:'错误',
                        //         message:'获取数据失败'
                        //     })
                        // }
                    })
                },
                //将数据字典数据转为中文
                getStateName(code){
                    for (let i=0; i<this.stateTypeList.length; i++){
                        if(this.stateTypeList[i].code === code){
                            return this.stateTypeList[i].state;
                        }
                    }

                },
                // ABO血型字典
                getABOtype(){
                    $.ajax({
                        url: '/aboType/normal/type',
                        type: 'get',
                        contentType: 'application/json',
                    }).then(res => {
                        this.optionAboType=res?res:{}
                        console.log(res)
                    })
                },
                //将数据字典code转为name
                getABOName(code){
                    for (let i=0; i<this.optionAboType.length; i++){
                        if(this.optionAboType[i].code === code){
                            return this.optionAboType[i].name;
                        }
                    }

                },
                // Rh血型字典
                getRhType(){
                    $.ajax({
                        url: '/rhType/normal/type',
                        type: 'get',
                        contentType: 'application/json',
                    }).then(res => {
                        this.optionRhType=res?res:{}
                    })
                },
                //将数据字典code转为name
                getRhName(code){
                    for (let i=0; i<this.optionRhType.length; i++){
                        if(this.optionRhType[i].code === code){
                            return this.optionRhType[i].name;
                        }
                    }

                },
                //批量删除
                batchDelete() {
                    if(JSON.parse(JSON.stringify(this.$refs.transfusionTable.selection)).length===0){
                        this.$notify({
                            title: '温馨提示：',
                            message: '您未选中数据，请重新操作！！！',
                            type: 'warning'
                        });
                        return;
                    }
                    let checkArr = JSON.parse(JSON.stringify(this.$refs.transfusionTable.selection));  // 存储了勾选到的数据
                    var ids=new Array()
                    for(var i=0;i<checkArr.length;i++){
                        ids[i]=checkArr[i].id;
                    }
                    console.log("打印所选编号")
                    console.log(ids)
                    // let data={ids:ids}
                    //批量删除
                    this.$confirm('确定删除这些数据吗, 是否继续?', '批量删除', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        axios({
                            url: '/transfusionClinic/normal/batchDelete',
                            method: 'put',
                            dataType: 'json',
                            data:ids
                        }).then(res => {
                            if (res.data.code === 200) {
                                this.$notify({
                                    tile: '温馨提示',
                                    message: '批量删除成功！！！',
                                    type: 'success'
                                })
                                this.getByQueryPage(0);
                            } else {
                                this.$notify({
                                    tile: '警告',
                                    message: '删除出错',
                                    type: 'warning'
                                })
                            }
                        }).catch(err => {
                            this.$notify.error({
                                title: '错误',
                                message: '删除失败',
                            })
                        });
                    }).catch(() => {
                        this.$message({
                            type: 'info',
                            message: '已取消删除'
                        });
                    });
                },

                //取消按钮
                cancel() {
                    this.dialogClinicVisible=false
                }
            }

        })
    })()
</script>
</body>
</html>